﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WW.Math;
using StuertzDatenbank.Properties;

namespace StuertzDatenbank
{
    class ZeichnungsEinstellungen
    {
        public Point3D Abstansdx;
        public Point3D Abstandy;
        public Point3D NULL;
        private int Zeilenumbruch;

        public ZeichnungsEinstellungen()
        {
            Abstansdx = new Point3D(Settings.Default.Abstandx, 0, 0);
            Abstandy = new Point3D(0, Settings.Default.abstandy, 0);
            NULL = new Point3D(0, 0, 0);
            Zeilenumbruch = Settings.Default.Zeilenumbruch;

        }

        internal Point3D Abstandxy(int j)
        {
            int Zeile = j / Zeilenumbruch;
            Point3D abstand = new Point3D((j-Zeile*Zeilenumbruch) * Abstansdx.X, 0, 0);
            WW.Math.Vector3D yabstand = new Vector3D(0, -Zeile * Abstandy.Y, 0);
            Point3D Babstand =WW.Math.Point3D.Add(abstand, yabstand);

            return Babstand;
        }
    }
}
